package com.shiguiwu.springmybatis.spring.extend;

import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @description: 使用配置继承，来简化bean的配置
 * @author: stone
 * @date: Created by 2021/3/11 11:59
 * @version: 1.0.0
 * @pakeage: com.shiguiwu.springmybatis.spring.extend
 */
public class ExtendsTests {

    public static void main(String[] args) {
        ClassPathXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext("spring/extends.xml");
//        String[] beanDefinitionNames = applicationContext.getBeanDefinitionNames();
//        for (String beanDefinitionName : beanDefinitionNames) {
//            System.out.println(applicationContext.getBean(beanDefinitionName));
//
//        }
        System.out.println(applicationContext.getBean(Cat.class));
        System.out.println(applicationContext.getBean(Pig.class));
    }
}
